import { Navigate } from 'react-router-dom'
import Search from '../pages/Search'
import Login from '../pages/Login'
import Register from '../pages/Register'
import Forget from '../pages/Forget'
const routes = [
  // 默认跳转到 /search
  {
    path: '/',
    element: <Navigate to='/search' />
  },
  {
    path: '/search',
    name: 'Search',
    element: <Search />
  },
  {
    path: '/login',
    name: 'Login',
    element: <Login />
  },
  {
    path: '/register',
    name: 'Register',
    element: <Register />
  },
  {
    path: '/forget',
    name: 'Forget',
    element: <Forget />
  }
]

export default routes
